home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
tchasm.arc
/
VARS.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1986-01-26
|
3KB
|
89 lines
CONST
Errorfile = 'TCHASM.MSG'; { File name for error messages}
{flag values: Bits 3-5 reserved for ext. values }
MACHOP : integer = 1; NEEDMODEBYTE : integer = 1024;
AUTOW : integer = 4; NEEDIMMED8 : integer = 2048;
ADDREG : integer = 64; NEEDIMMED : integer = 4096;
NEEDEXT: integer = 128; DIRECTION : integer = 8192;
NEEDISP8 : integer = 256; NEEDMEM : integer = 16384;
NEEDISP16 : integer = 512; AUTOC : integer = $8000;
{operand types }
ACUM8 : integer = 1; MEMY : integer = 128;
ACUM16 : integer = 2; IMMED8 : integer = 256;
REG8 : integer = 4; IMMED16 : integer = 512;
REG16 : integer = 8; NONE : integer = 1024;
MEMREG : integer = 16; STRG : integer = 2048;
C_S : integer = 32; NEAR : integer = 4096;
SEGMNT : integer = 64; FAR : integer = 8192;
CL : integer = 16384;
{assembler constants for arrays }
MAXOBJ = 50;
MAXSTK = 10;
MAXNUMOP = 250;
MAXSYM = 500;
OPCODEFILE = 'TChasm.Dat';
Type
AnyString = String[255];
SetOfChar = Set of Char;
IOType = (Disk,Memory,Scrn,Printer,NoIO); {Could add Macro to this list
if you want a macro processor}
NumTypes = (BaseTen,Hexadecimal,Binary);
OpCodeRec = Record {Describes the OpCode records in }
Mnemonic : String[6]; {TChasm.Dat, (modified Chasm.Dat) }
OpCodeVal : integer;
DstType : integer;
SrcType : integer;
Flagss : integer;
End; {OpCodeRec }
SymbolRec = Record
Symbol : String[25];
Val1,Val2 : integer;
SymType : integer;
End; {SymbolRec }
var
Obj : Array[0..MAXOBJ] of byte; {object code array }
ProcType : Array[0..MAXSTK] of integer; {stack of procedures }
OpCodes : Array[1..MAXNUMOP] of OpCodeRec;{opcode table }
SymTable : Array[1..MAXSYM] of SymbolRec; {symbol table }
ListLoc,SourceLoc : IOType; { I hate to have all of these uncommented }
i,NumOp,Predef, { global variables, but I'm too lazy to }
CharVal,Offset, { do anything about it. I have tried to }
OffsetType,OffsetVal, { make most of the routines use fewer }
MemAddr,RegVal, { global variables, but I don't like }
NumType,NumVal, { to pass numerous variables all the time.}
Flag,Diag,
DVal1,DVal2,
SVal1,SVal2,
TargType,TargVal1,TargVal2,
Errs,NumSym,
OpPtr,SType,DType,
OpdPtr,TablePtr,
LinePtr,LinePtr2,
EndPtr,StrgEnd,
StkTop,Pass,
Loctr, ObjLen,
NeedOffset,
CodeSize,
LineNum : integer;
SourceName,
LogDir,
TargetStr,
InpLine,FldStr,
LabelStr,SourceStr,
DestStr,OpStr,
ListName,ObjName : AnyString;
ListFile,
SourceFile,
ObjFile,
DataFile : Text;
OK,Quitting,
Found,EndofSource,
Word,DSFlag : Boolean;
Quote,
ch : char;